home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.1 / card_5204.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  91 lines

  1. -- card: 5204 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2612
  5. -- name: DeProtect
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A004
  11. -- rect: left=224 top=243 right=293 bottom=283
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 27056 / 27056
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Try It
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then pass mouseup
  23.   put "Please select a protected stack"
  24.   set cursor to 4
  25.   put filename("STAK") into fname
  26.   if fname is empty then
  27.     play oops
  28.     hide message window
  29.     exit mouseUp
  30.   end if
  31.  
  32.   deprotect fname
  33.  
  34.   if the result is empty
  35.   then answer "Deprotect Successful" with "OK"
  36. else osErr the result
  37. end mouseUp
  38.  
  39.  
  40.  
  41. -- part 2 (button)
  42. -- low flags: 00
  43. -- high flags: A003
  44. -- rect: left=82 top=302 right=324 bottom=182
  45. -- title width / last selected line: 0
  46. -- icon id / first selected line: 0 / 0
  47. -- text alignment: 1
  48. -- font id: 0
  49. -- text size: 12
  50. -- style flags: 0
  51. -- line height: 16
  52. -- part name: Install
  53. ----- HyperTalk script -----
  54. on mouseUp
  55.   if the optionkey is down then pass mouseup
  56.   put installres(XCMD,deProtect) into it
  57.   if it is empty then play oops
  58.   else answer it
  59. end mouseUp
  60.  
  61.  
  62.  
  63. -- part contents for background part 2
  64. ----- text -----
  65. DeProtect
  66.  
  67. -- part contents for background part 3
  68. ----- text -----
  69.  
  70. Calling this will let you remove the standard Hypercard protection from any stack.
  71.  
  72.  
  73. Thanks to:
  74. Ned Horvath
  75. Allan Foster
  76.  
  77. -- part contents for background part 10
  78. ----- text -----
  79. Syntax:
  80.  
  81. DeProtect <filename>
  82.  
  83. <filename> is the full patname of a Hypercard Stack (no quotes).
  84.  
  85. If no value is returned to result, then deprotection was successful.  
  86.  
  87. To correctly handle other error codes, use the osErr* command.
  88.  
  89. -- part contents for background part 13
  90. ----- text -----
  91. 2